# 导包
import requests
# 发送请求
# resp = requests.get("http://www.baidu.com/s?wd='武汉天气'")
# 方式2
resp = requests.get("http://www.baidu.com/s",params={"wd":"武汉天气"})
# 查看响应信息
print(resp.status_code)
resp.encoding = "UTF-8"
print(resp.text)